﻿using QLBH.DATA;
using QLBH.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QLBH.BUSINESS
{
    public class KhoHangBus
    {
        private static KhoHangData db = new KhoHangData();

        public static List<KHO_HANG> TimKhoHangTheoTen(string ten_kho_hang)
        {
            return db.TimKhoHangTheoTen(ten_kho_hang);
        }

        public static string Them(KHOHANGPARAM KHO)
        {
                if (db.Them(KHO))
                {
                    return "1";
                }
                else
                    return db.Error;  
        }

        public static string CapNhat(KHOHANGPARAM KHO)
        {
            if (db.CapNhat(KHO))
            {
                return "1";
            }
            else
                return db.Error;  
        }

        public static string Xoa(string[] ma_kho_hang)
        {
            if (db.Xoa(ma_kho_hang))
            {
                return "1";
            }
            else
                return db.Error;  
        }

    }
}